<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="/static/build/layui.css" media="all">
<%@include file="/common/common.jspf"%>
<script type="text/javascript" 
	src="${ctx}/js/transport/transporinfo/transport_add.js"></script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
.cardrivre{
display: none;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/ransportTransporinfo/transport_addEntity.shtml">
		<section class="panel panel-default">
		<div class="panel-body">
			
			<div class="form-group">
				<label class="col-sm-3 control-label">车牌号</label>
				<div class="col-sm-9">
					<select class="form-control selectinfo" name="transportTransporinfoFormMap.licenseNo">
						<option value="0">请选择</option>
						<c:forEach var="key" items="${motorcadeInfoFormMap }">
							<option value="${key.licenseNo}">${key.licenseNo}</option>
						</c:forEach>
						
					</select>
				</div>
			</div>
			
			
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">客户</label>
				<div class="col-sm-9"> 
					<select class="form-control" name="transportTransporinfoFormMap.clientId">
						<c:forEach var="key" items="${clientFormMap }">
							<option value="${key.id}">${key.name}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in cardrivre"  ></div>
			<div class="form-group cardrivre" >
				<label class="col-sm-3 control-label">司机</label>
				<div class="col-sm-9"> 
					<select class="form-control" name="transportTransporinfoFormMap.driverinfoId" 
							id="driverName">
						<c:forEach var="key" items="${transportTransporinfoFormMaps }">
							 <option value="${key.id}">${key.driverName}</option> 
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">出车时间</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportTransporinfoFormMap.carDispatchDate" id="carDispatchDate" />
				</div>
			</div>
			
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">计划回厂时间</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportTransporinfoFormMap.plangoDate" id="plangoDate" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">实际回厂时间</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入内容"
						name="transportTransporinfoFormMap.practicalgoDate" id="practicalgoDate" />
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			
		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">新增</button>
		</footer> </section>
	</form>
<script type="text/javascript" src="${ctx}/js/jedate/jedate.js"></script>
	<script type="text/javascript">
		jeDate({
			dateCell : "#plangoDate",
			format : "YYYY-MM-DD hh:mm:ss",
			isinitVal : false,
			isTime : true,
			isClear : false,
			minDate : "2014-09-19 00:00:00"
		})
		jeDate({
			dateCell : "#practicalgoDate",
			format : "YYYY-MM-DD hh:mm:ss",
			isinitVal : false,
			isTime : true,
			isClear : false,
			minDate : "2014-09-19 00:00:00"
		})
		jeDate({
			dateCell : "#carDispatchDate",
			format : "YYYY-MM-DD hh:mm:ss",
			isinitVal : false,
			isTime : true,
			isClear : false,
			minDate : "2014-09-19 00:00:00"
		})
		$(".selectinfo").change(function() {
				$("#driverName").empty();
				var id = $(this).val();
				$.getJSON(rootPath + "/ransportTransporinfo/transportTransporinfo_id.shtml",
						"id=" + id, function(data) {
					if(data=='false'){
						$(".cardrivre").hide(500);
					}else{
						$("#driverName").empty();
						$.each(data, function(i, item){
							$("#driverName").append("<option value="+item.id+">"+item.driverName+"</option>");     
							$(".cardrivre").show(500);
						}); 
					}
				});
			});
	</script>
</body>
</html>